
import { Request } from "./request";

// 启动页与图片轮播数据

module.exports.Banner = () => Request({
  url: "/banner/list",
  method: "get"
}),
// 分类
module.exports.shop = () => Request({
  url: "/shop/goods/category/all",
  method: "get"
})
// 公告
module.exports.notice = () => Request({
  url: "/notice/last-one",
  method: "get"
})
// 广告
module.exports.adPosition = (data) => Request({
  url: "/site/adPosition/batch",
  method: "get",
  data,
})
// 商品列表
module.exports.goods = (data) => Request({
  url: "/shop/goods/list/v2",
  method: "post",
  data,
})
// 商品详情
module.exports.getdetail=(data)=>Request({
  url:'/shop/goods/detail',
  method:"get",
  data
})

// 加入购物车
module.exports.shopping=(data)=>Request({
  url:'/shopping-cart/add',
  method:"post",
  data
})
// 购物车数据
module.exports.getcart=(data)=>Request({
  url:'/shopping-cart/info',
  method:"get",
  data
})
// 清空购物车
module.exports.getempty=(data)=>Request({
  url:'/shopping-cart/empty',
  method:"post",
  data
})
// 删除购物车
module.exports.getremove=(data)=>Request({
  url:'/shopping-cart/remove',
  method:"post",
  data
})
// 购物车修改购买数量
module.exports.getemodifyNumber=(data)=>Request({
  url:'/shopping-cart/modifyNumber',
  method:"post",
  data
})
// 购物车修改选中状态
module.exports.getselect=(data)=>Request({
  url:'/shopping-cart/select',
  method:"post",
  data
})


